<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="content-type" content="text/html;charset=utf-8">
    <title>welcome,<%=user.email%></title>
    <%include ../head%>
  </head>
  <body>
      <%include ../header%>
      <div id="container">
        <div class="container">
          <form method="post" action="/ad/create" id="ad-form" class="form-horizontal required-form">
             <!-- alert message -->
             <div class="alert">
                <button type="button" class="close" data-dismiss="alert">×</button>
                <strong></strong><span class="mes"></span>
             </div>
             <div class="control-group">
                  <label class="control-label" for="siteName"> 网站名称</label>
                  <div class="controls">
                    <input id="siteName" name="siteName" type="text" required class="required" placeholder="网站名称"></input>
                  </div>
             </div>
              <div class="control-group">
                    <label class="control-label" for="domain"> 网站域名</label>
                    <div class="controls">
                            <div class="input-prepend">
                              <span class="add-on">Http://</span>
                              <input type="text" id="domain" name="domain" placeholder="例如:www.instreet.cn" required class="required">
                            </div>
                    </div>
              </div>
             <div class="control-group">
                  <label class="control-label" for="adSize">  广告尺寸</label>
                  <div class="controls">
                    <select id="adSize" name="adSize" >
                        <option value="300_250">300*250</option>
                        <option value="336_280">336*280</option>
                    </select>
                  </div>
             </div>
             <div class="control-group">
                  <label class="control-label" for="adType">  广告类型</label>
                  <div class="controls">
                    <select id="adType" name="adType" >
                        <option value="adsense">Adsense</option>
                        <option value="afv">AFV</option>
                        <option value="dfp">DFP</option>
                        <!-- <option value="custom">直客</option> -->
                    </select>
                  </div>
             </div>
             <!-- adsense and afv-->
             <div id="ad-adsense">
               <div class="control-group">
                    <label class="control-label" for="pubID"> Google PubID</label>
                    <div class="controls">
                        <input id="pubID" name="pubID" type="text" required class="required" placeholder="例如:pub-123412345"></input>
                    </div>
               </div>
              <div class="control-group">
                    <label class="control-label" for="slot"> Google Slot</label>
                    <div class="controls">
                        <input id="slot" name="slot" type="text" required class="required"></input>
                    </div>
               </div>
             </div>
             <!-- DFP -->
              <div id="ad-dfp" style="display:none;">
               <div class="control-group">
                    <label class="control-label" for="dfpID"> DFP ID</label>
                    <div class="controls">
                        <input id="dfpID" name="dfpID" type="text" ></input>
                    </div>
               </div>
              <div class="control-group">
                    <label class="control-label" for="dfpName"> DFP Name</label>
                    <div class="controls">
                        <input id="dfpName" name="dfpName" type="text" ></input>
                    </div>
               </div>
             </div>
             <div id="ad-setting">
               <div class="control-group">
                  <div class="controls">
                    <a href="javascript:;" class="setting">
                      更多设置
                    </a>
                  </div>
               </div>
                <div class="setting-box">
                    <div class="control-group">
                      <label class="control-label" for="closePosition">关闭按钮位置</label>
                      <div class="controls">
                        <select id="closePosition" name="closePosition">
                          <option value="tl">左上角</option>
                          <option value="tr">右上角</option>
                          <option value="bl">左下角</option>
                          <option value="br">右下角</option>
                        </select>
                      </div>
                    </div>

                    <div class="control-group">
                      <label class="control-label" for="showLogo">显示尚街标识</label>
                      <div class="controls">
                        <select id="showLogo" name="showLogo">
                          <option value="1">是</option>
                          <option value="0">否</option>
                        </select>
                      </div>
                    </div>

                    <div class="control-group">
                      <label class="control-label" for="showReplay">显示重新播放</label>
                      <div class="controls">
                        <select id="showReplay" name="showReplay">
                          <option value="1">是</option>
                          <option value="0">否</option>
                        </select>
                      </div>
                    </div>

                    <div class="control-group">
                      <label class="control-label" for="closeReplay">重新播放可关闭</label>
                      <div class="controls">
                        <select id="closeReplay" name="closeReplay">
                          <option value="0">否</option>
                          <option value="1">是</option>                          
                        </select>
                      </div>
                    </div>

                    <div class="control-group">
                          <label class="control-label" for="minitime">定时最小化</label>
                          <div class="controls">
                          <div class="input-append">
                           <input type="text" id="minitime" name="minitime" class="input-mini" placeholder="必须是正整数" >                          
                            </input>
                            <span class="add-on">秒</span>
                          </div>
                      </div>
                    </div>
                    
                    <div class="control-group">
                          <label class="control-label" for="adClickProb">点击概率</label>
                          <div class="controls">
                          <div class="input-append">
                           <input type="text" id="adClickProb" name="adClickProb" class="input-mini" placeholder="值为0~100间的数字" value="0">                          
                            </input>
                            <span class="add-on">%</span>
                          </div>
                      </div>
                    </div>

                    <div class="control-group">
                      <label class="control-label" for="trackUrl">CNZZ监控</label>
                      <div class="controls">
                        <input type="text" id="trackUrl" name="trackUrl" placeholder="CNZZ监控地址"></input>
                      </div>
                    </div>
                </div>                
             </div>
              <div class="control-group">
                    <div class="controls">
                    <input type="submit" class="btn btn-success btn-medium" value="创建广告"/>
                    </div>
              </div>
          </form>
        </div>
      </div>
      <%include ../script%>
      <script type="text/javascript" >
        seajs.use(['/js/validate'],function  (validate) {          
          validate.validateAd();
        });
      </script>
      <%include ../footer%>
 </body>
 </html>